<?php

include_once dirname(__FILE__).'/class/functions.php';
include_once dirname(__FILE__).'/class/user.class.php';



$logat = is_logat();
?>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="icon" href="favicon.jpg" type="image/gif" sizes="16x16" /> 
        <link rel="stylesheet" type="text/css" href="./style/style.css" />
        <title>Contul Meu</title>
    </head>
<body>
   <? 
      what_header();
      footer();
        ?>
        <div id="content">
            <div id="content_inside">
                    <div id="content_inside_sidebar">
                        <ul>
                            <li><a href ="index.php"> Home</a><br />
                            </li><li><a href ="cauta.php"> Cautare</a><br /></li>
                            <li><a href ="rezervare.php"> Rezervari</a><br /></li>                   
                                           
                         </ul>
                                 
                    </div>
            <div id="content_inside_main">
<?
//print_r($_SESSION);
if($logat == 0)
    die("Nu v-ati logat! Trebuie sa fiti logat pentru a vedea date personale ale unui utilizator!");
else
{
    $user=  unserialize($_SESSION['userc']);
    $user_act = new user_func($user->id,$user->name,$user->hash,$user->tip);
    if(isset($_GET['id'])){
    mysql_safer();
    $uid=$_GET['id'];
    $profil = new user_func();
    if ($profil->preia_detalii($uid ) ==0)
        die("Eroare la incarcarea informatiior din baza de date");
   
    
    if ($_SESSION['logat'] == "user")
    {
        echo $profil->afiseaza_informatii();
        if($user->id==$uid){
        echo "Schimba: "; 
        echo $profil->select_tag($path."modifica_un_camp.php");
        }
    }else
        if($_SESSION['logat'] == "admin")    
        {
            echo "Sunteti logat ca admin <br/>";
            echo $profil->afiseaza_informatii();
            echo "Schimba: "; 
            echo $profil->select_tag($path."modifica_un_camp.php");
            
                ?> <br/> <br/>
                
                <form action="<?echo $path; ?>boss/modifica_drepturi.php?id=<?echo $uid; ?>" method="post">
                    Starea: <br/>
                    <pre>
                    <input type = "radio" name="activ" value="1">Activ <br/>
                    <input type = "radio" name="activ" value="0">Inactiv <br/>
                    </pre>
                    Grupul:<br/>
                    <pre>
                    <input type = "radio" name="grup" value="0">Admin <br/>
                    <input type = "radio" name="grup" value="1">User <br/>
                    </pre>
                    <a href="#" class="grey-button pcb"><span><input type="Submit" value="Modifica"></input></span></a>
                </form>
                
                <?
        }
        
    }
}


?>


                
                
</body>



</html>